package Ex1;

import java.util.Scanner;

public class Ex08_Q32 {

	public static void main(String[] args) {

		Scanner scan = new Scanner(System.in);
		
		long jumin = 0;
		int sum = 0;
		int key = 0;
		int tot = 0;
		System.out.println("주민번호 입력");
		jumin = scan.nextLong();
		/*
		 * 
		 * key = (int) (jumin / 1000000000000L); if(key!=0)jumin = jumin % (key
		 * * 1000000000000L);
		 * 
		 * sum=sum+(key*2);
		 * 
		 * 
		 * key = (int) (jumin / 100000000000L); if(key!=0)jumin = jumin % (key *
		 * 100000000000L); sum=sum+(key*3);
		 * 
		 * key = (int) (jumin / 10000000000L); if(key!=0)jumin = jumin % (key *
		 * 10000000000L); sum=sum+(key*4);
		 * 
		 * key = (int) (jumin / 1000000000L); if(key!=0)jumin = jumin % (key *
		 * 1000000000L);
		 * 
		 * sum=sum+(key*5);
		 * 
		 * key = (int) (jumin / 100000000L); if(key!=0)jumin = jumin % (key *
		 * 100000000L);
		 * 
		 * sum=sum+(key*6);
		 * 
		 * key = (int) (jumin / 10000000L); if(key!=0)jumin = jumin % (key *
		 * 10000000L);
		 * 
		 * sum=sum+(key*7);
		 * 
		 * key = (int) (jumin / 1000000L); if(key!=0)jumin = jumin % (key *
		 * 1000000L);
		 * 
		 * sum=sum+(key*8);
		 * 
		 * key = (int) (jumin / 100000L); if(key!=0)jumin = jumin % (key *
		 * 100000L);
		 * 
		 * sum=sum+(key*9);
		 * 
		 * key = (int) (jumin / 10000L); if(key!=0)jumin = jumin % (key *
		 * 10000L);
		 * 
		 * sum=sum+(key*2);
		 * 
		 * key = (int) (jumin / 1000L); if(key!=0)jumin = jumin % (key * 1000L);
		 * 
		 * sum=sum+(key*3);
		 * 
		 * key = (int) (jumin / 100L); if(key!=0)jumin = jumin % (key * 100L);
		 * 
		 * sum=sum+(key*4);
		 * 
		 * key = (int) (jumin / 10L); if(key!=0)jumin = jumin % (key * 10L);
		 * sum=sum+(key*5); tot=sum%11;
		 * 
		 * if(11-tot==jumin) System.out.println("정상민번");
		 * 
		 * 
		 * else System.out.println("비정상");
		 */

		// 반복문 사용

		long divider = 0L; 


		
		//for (divider = (long) Math.pow(10, 12), prime = 2; divider >= 10; 
		//		divider /= 10, ++prime){
			
		for (int pow=12, prime = 2; pow >= 1; --pow, ++prime){
			
			divider = (long) Math.pow(10, pow);

			if (prime > 9)	prime = 2;
		
			key = (int) (jumin / divider);
	
			if (key != 0)
				jumin = jumin % (key * divider);

			sum = (int) (sum + (key * prime));
		}
		tot = sum % 11;
 
		
		
		
		if (11 - tot == jumin)
			System.out.println("정상민번");

		else
			System.out.println("비정상");
	}

}
